import request from '@/utils/request'

// 清除报警记录
export function clearAlarm(id) {
  return request({
    url: '/assembly/preserve/clearAlarm/'+id,
    method: 'get',
  })
}



// 查询报警记录
export function alarmMsgList() {
  return request({
    url: '/assembly/preserve/alarmMsgList',
    method: 'get',
  })
}

// 查询告警维护记录列表
export function listPreserve(data) {
  console.log(data);
  return request({
    url: '/assembly/preserve/list',
    method: 'post',
    data
  })
}

// 查询告警维护记录详细
export function getPreserve(id) {
  return request({
    url: '/assembly/preserve/' + id,
    method: 'get'
  })
}

// 新增告警维护记录
export function addPreserve(data) {
  return request({
    url: '/assembly/preserve',
    method: 'post',
    data: data
  })
}

// 修改告警维护记录
export function updatePreserve(data) {
  return request({
    url: '/assembly/preserve',
    method: 'put',
    data: data
  })
}

// 删除告警维护记录
export function delPreserve(id) {
  return request({
    url: '/assembly/preserve/' + id,
    method: 'delete'
  })
}
